home *** CD-ROM | disk | FTP | other *** search
- /*
- * fork(), vfork(): emulate Unix calls. fork() creates a new process with
- * identical (but *not* shared) data space; vfork() does the same, but
- * shares data and stack with the parent. Note that, unlike Unix, the
- * parent is suspended until the child exits. Also note that fork() is
- * usable only if _initial_stack is non-zero, so that the process is
- * doing malloc's from the heap.
- *
- * wait() retrieves the exit status and pid of children created by
- * fork.
- *
- * see fork.c for _fork() and _wait().
- *
- * written by Eric R. Smith and placed in the public domain.
- * use at your own risk.
- */
-
- #include "fork.h"
-
- int fork()
- {
- return _fork((char *)0);
- }
-
- int
- vfork(dummy)
- int dummy;
- {
- return _fork((char *)&dummy);
- }
-
- int
- wait(exit_code)
- int *exit_code;
- {
- return _wait(exit_code);
- }
-